Ext.define('Risk.view.RCPanel', {
    extend: 'Ext.form.Panel',
    alias: 'widget.rcpanel',
    layout:  {
        type: 'table',
        // The total column count must be specified here
        columns: 1
    },
    isLoad:false,//记录rcpanel 是否加载过
    autoShow: true,
    buttonAlign:'center',
    url:'rc/addorupdate.do',
    initComponent: function() {
      //初始化Window中的内容
    	this.items = [
    	          {
    	        	  //與後面的電力關联
    	        	  itemId:'power',
    	        	  xtype:'checkbox',
    	        	  boxLabel:'包含电力',
    	        	  name:'power',
    	        	  inputValue:1
    	        		  
    	          },
    	         {
    	        	 margin:'5 10 5 5',
    	        	 height:120,
    	        	 width:680,
    	        	 xtype: 'pcpowerfieldSet',
    	        	 disabled :true
    			  },
    			  {
    				  //和通訊相關联
    				  itemId:'communicate',
    	        	  xtype:'checkbox',
    	        	  boxLabel:'包含通信线',
    	        	  inputValue:2,
    	        	  name:'commu'
    	          },
    			  {
    				  margin:'5 10 5 5',
    				  height:120,
    				  xtype: 'pcfieldSet',
    				  width:680,
    				  disabled :true
    			  },
    			  {
    				  margin:'5 10 5 5',
    				  height:120,
    				  xtype: 'lcfieldset',
    				  width:680
    			  },
    			  {
    				  margin:'5 10 5 5',
    				  height:120,
    				  xtype: 'lc2fieldset',
    				  width:680
    			  },
    			  {
    				  margin:'5 10 5 5',
    				  height:200,
    				  width:680,
    			      xtype: 'rcresult'
    			   },
    			   {
     			      xtype: 'hidden',
     			      name:'id',
     			      value:null
    			   }
        ];
    	this.buttons=[
						{
							  xtype:'button',
							  text:'计         算',
							  action:'calculate'
						},
						{
							  xtype:'button',
							  margin:'0 0 0 10',
							  text:'保存参数',
							  action:'save'
						}
    	              ];
        this.callParent(arguments);
    }
    
});